home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-03
/
getwlst.zip
/
VBSWITCH.FRM
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1991-07-16
|
2KB
|
66 lines
Form1
VB Task Switcher
Form1
TaskList
Switch
Switch
TaskEnder
End Task
Command1_Click
SendMessage
Form1T
hTheWnd
WM_GETTEXTI
Text1&
Form_Click
@ Form_Load
NumWnds
OpenWindows
GetOpenWindows\
OpenWindown
IntegerDim
Text2
TaskList_Clickk
WindowName
TaskList
nLength
Switch_Click
ListIndex!
ActivateApp
FillTaskList
Form_GotFocus
TaskListBox
GetFocus
LB_RESETCONTENT6
TaskList_DblClick
Switch{
Click
Value
OpenTask
TaskEnder_Click
EndTask
Hints
reads
part<
Application Notes
1. Do not set the Sorted Property of the list box to TRUE.
Doing so will have frustrating, albeit humorous, repercussions.
2. Unlike Task Manager, this application will _not_ close if you
move the focus to another application. This was not meant to be
a completely implemented Task Manager-like application; it wasw
meant to demonstrate a possible use of the GetWindowList function.o
(Even though I guess I did get a little carried away... The VB app
took much longer to write than the DLL did.)
3. (EXE only) If there are no windows (other than VBSWITCH) on the desktop
when VBSWITCH is loaded, you may get an Invalid Property Valuel
error. The solution to this is (as they say) left as an exercise
for the reader
(Hint: look for the code that reads, in part:r
TaskListBox.ListIndex = 0 and consider wrapping it an a conditional
that checks the number of items in the list box...)
Form_Load
Switch_Click
TaskList_DblClick
Switch.Value = -1 ' A listbox doubleclick acts like a switch push
TaskEnder_Click